package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.dto.CategoryDTO;
import com.sky.entity.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CategoryMapper {

     void insert(Category category);

     List<Category> list(Integer type);

     List<Category> page(Integer type, String name);

     void update(Category category);

     void delete(Long id);

     @Select("select name from category where id = #{categoryId}")
    String selectNameId(Long categoryId);

}
